home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / Prograph Classic 2.6.1 / Examples / Utilities / Print ƒ / Print Classes.ReadMe < prev   
Text File  |  1994-10-21  |  2KB  |  23 lines

  1. Example:      Print Classes
  2. Written by:  Prograph International
  3. Contents:     Print Classes.pgs
  4.                    Print Classes.ReadMe
  5.  
  6. Needs Prograph Extensions:
  7.                     Math Primitives
  8.                     More Primitives
  9.                     Primitives
  10.  
  11. Needs Libraries to Compile:
  12.                     SCLibrary 2.6
  13.                     Library 2.6
  14.  
  15. Description
  16. -----------
  17.     The Printer class provides a set of methods for initialising printing information in your program, calling Page Setup, sending a document to the printer, and disposing of print structures.  This class is very general, and you are required to provide code for figuring out the number of pages in your document, and the code to actually draw the contents of your document into the printer port.
  18.  
  19.    The <<Text>> Printer and <<Canvas>> Printer subclasses go a little bit further, providing drawing code for Text and Canvas items.
  20.  
  21. How To Use in Your Program
  22. --------------------------
  23.    Selectively load the Printer class and, optionally, the subclasses into your file.  If you like, create your own subclass of Printer and overshadow the "count pages" and "draw page" methods with your own logic.  When your program starts up, or before doing any printing, create an instance of class Printer or a subclass and store it somewhere.  When the user selects Page Setup… from the menu, call "/page setup" with the instance as input.  When the user selects Print from the menu, call "/print" with the instance as input.  If the Printer instance is not going to be saved, call "/dispose" before deleting the last reference to it.